﻿CREATE TABLE [dbo].[OrderProductInfo] (
    [OrderProductID]         UNIQUEIDENTIFIER NOT NULL,
    [ProductID]              INT              NOT NULL,
    [ProductName]            NVARCHAR (200)   NOT NULL,
    [ProductSpecAndPropName] NVARCHAR (200)   NULL,
    [ProductFullName]        NVARCHAR (200)   NULL,
    [ImageID]                UNIQUEIDENTIFIER NULL,
    [UserID]                 BIGINT           NOT NULL,
    [BuyPrice]               MONEY            NOT NULL,
    [TotalFee]               MONEY            NOT NULL,
    [BuyCount]               INT              NOT NULL,
    [UseInvernery]           INT              NULL,
    [OrginalPrice]           MONEY            NULL,
    [BuyCardinality]         INT              NULL,
    [OrderID]                VARCHAR (32)     NOT NULL,
    [AccessoriesRate]        DECIMAL (8, 4)   NULL,
    [SendCargo]              NVARCHAR (200)   NULL,
    [ProductCategory]        NVARCHAR (50)    NULL,
    [ProductProperty]        NVARCHAR (200)   NULL,
    [Unit]                   NVARCHAR (10)    NULL,
    [BuyExplain]             NVARCHAR (200)   NULL,
    CONSTRAINT [PK_ORDERPRODUCTINFO] PRIMARY KEY CLUSTERED ([OrderProductID] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'购买说明', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'BuyExplain';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'单位', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'Unit';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'性质', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'ProductProperty';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品种类', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'ProductCategory';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'发货地', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'SendCargo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'铺料比例', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'AccessoriesRate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'订单标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'OrderID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'购买基数', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'BuyCardinality';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'原来单价', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'OrginalPrice';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'占用库存', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'UseInvernery';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'购买数量', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'BuyCount';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'总金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'TotalFee';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'购买单价', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'BuyPrice';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'UserID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品图片标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'ImageID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品完整名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'ProductFullName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品规格及属性名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'ProductSpecAndPropName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品基本名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'ProductName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'ProductID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'订单商品标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo', @level2type = N'COLUMN', @level2name = N'OrderProductID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'订单包含的商品信息', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OrderProductInfo';

